package com.zjy.software.day15;

public class ThreadTest
{
    public static void main(String[] args) throws InterruptedException {
        //创建一个共同访问的对象
        Account account = new Account();
        account.setCount(2000);

        // 创建取钱的线程
        Thread t1 = new DrawThread(account, "张三");
        Thread t2 = new DrawThread(account, "李四");
        Thread t3 = new DrawThread(account, "王五");

        t1.start();
        t2.start();
        t3.start();

        Thread.sleep(2000);
    }
}
